//import java.io.BufferedReader;
import java.io.IOException;
//import java.io.InputStreamReader;


public class Fibonacci1 {
	public static void main (String[] args) throws IOException
	{
	
		//BufferedReader br = new BufferedReader(new InputStreamReader (System.in));
		
		for (int i =0 ;i<=5; i++)
			System.out.println(fibo(i));
	}
	
	private static int fibo(int n) //this logic will calculate Fibonacci Series
	{
		
		if (n==0)
			return 0;
		else
			if (n==1)
				return 1;
			else
		return fibo(n-1) + fibo(n-2);
	}
}
